import { Page, test } from "@playwright/test";
export const newTest = test.extend<{ authed: Page }>({
  authed: async ({ page }, use) => {
    await page.goto("https://sei-test.021hqit.com/group-9/#/login");
    await page.getByPlaceholder("请输入用户名").fill("ecnu_admin");
    await page.getByPlaceholder("请输入密码").fill("pl,okm123");
    await page.getByRole("button", { name: "登录" }).click();
    await use(page);
  },
});
export const authed = () => {
  test.beforeEach(async ({ page }) => {
    await page.goto("https://sei-test.021hqit.com/group-9/#/login");
    await page.getByPlaceholder("请输入用户名").fill("ecnu_admin");
    await page.getByPlaceholder("请输入密码").fill("pl,okm123");
    await page.getByRole("button", { name: "登录" }).click();
  });
};
